import React from "react";
import Nav from "./components/Nav";
import "./style.css";

import { Switch, Route, Redirect } from "react-router-dom";

import Hot from "./hot/Index";
import Cinema from "./cinema/Index";
import Wait from "./wait/Index";
import Classic from "./classic/Index";

const Index = () => {
  return (
    <>
      <header className="top">这是电影页面</header>
      <Nav />

      <Switch>
        <Redirect from="/home/movies" to="/home/movies/hot" exact></Redirect>
        <Route path="/home/movies/hot" component={Hot}></Route>
        <Route path="/home/movies/cinema" component={Cinema}></Route>
        <Route path="/home/movies/wait" component={Wait}></Route>
        <Route path="/home/movies/classic" component={Classic}></Route>
      </Switch>
    </>
  );
};

export default Index;
